1. Field of Invention
The present invention relates generally to a method for enhancing print quality of halftone images. More particularly, the method is applicable to the halftone print mode of a multi-function printer, or a regular printer, in which, the edge characteristic parameter is analyzed and fed back to the print process of an error diffusion method.
2. Description of Related Art
Because multi-function printers and scanners are being used in daily life more and more frequently, the quality and performance of image printing is getting important. The ultimate goal is to make the output image data equal to the original image data as possible. Some algorithms are used to modify the process to make the colors of the output image more smoother, and get better reproduction of the image.
In an ordinary image processing flow, a document manuscript is first scanned and sampled by a scanning module to form a digitized RGB data for input. The data goes through the CMYK conversion, halftone processing and picture/text enhanced processing, a CMYK halftone image is produced and finally printed by a printer module. From scanning/sampling to printing, the CMYK conversion and halftone processing are required, by proper arrangement of printed positions of various colors so that human eyes can perceive a variation of colors and color levels.
With halftone processing, order dithering and error diffusion are the two main methods currently employed. In the order dithering method, the resolution is reduced to increase the gray scale levels, i.e., an image region is encoded in the point mode to simulate the gray scale effect seen by the human eye. In other words, if there are many points of a color in a region encoded in the point mode, the gray scale level of this color is higher.
Visually, a better smooth effect can be obtained through the error diffusion method. The error diffusion method is based on the principle that the generated gray scale error is distributed to adjacent pixels proportionally when a continuous gray scale image is digitized in binary. That is, the gray scale error in a specific direction is used to determine whether the next pixel is black or white after being accumulated in a specific ratio. As shown in FIG. 1, an error diffusion circuit mainly comprises a first adder 11, a quantizer 12, a second adder 13 and an error filter 14, where Xij is an input image pixel, Uij is an error diffusion pixel, X′ij is an output image pixel, and eij is an error to be distributed to adjacent pixels.
The error eij of adjacent pixels is obtained from the pixel X′ij of the output image subtracts the pixel Uij of the error diffusion using the second adder 13. The error eij of adjacent pixels is processed by the error filter H(z) 14 to get a corrected pixel error H(e(i,j)). The first adder 11 adds the input image pixel Xij by the pixel error H(e(i,j)) to obtain a corrected error diffusion pixel Uij. The error diffusion pixel Uij is then compared with a threshold T of the quantizer 12 to get two extreme values (0 or 1) for output. That is, if the error diffusion pixel Uij is larger than the threshold T, the output binary digit is 1; if the error diffusion pixel Uij is smaller than the threshold T, the output binary digit is 0. Therefore, in the error diffusion method, a known pixel is considered. The pixel has a certain error with the final result. If this error is distributed to surrounding pixels, the error of a single pixel will have little influence to the final output picture.
Although the halftone processing way by means of error diffusion has a smoother effect visually on image processing, but causes other problems making the edges of regions with large difference in gray scale values soft and dispersive. For instance, blurs will be easily generated at text edges on an image.